
public class undiversify {
	static byte [] A;
	static byte [] B;
	static byte [] C;

	static byte [] A_Xor_B;
	static byte [] A_Xor_C;
	static byte [] B_Xor_C;

	public static void  Two_Three(byte [] one, byte [] two){
		if (one[0]==0){
			A= new byte[one.length-1];
			System.arraycopy(one,1,A,0,one.length-1);
			A_Xor_B= new byte[two.length-1];
			System.arraycopy(two,1,A_Xor_B,0,two.length-1);
			B = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     B[i]=(byte)(A[i]^A_Xor_B[i]);
			    }
		}
		else if (one[0] ==1){
			B= new byte[one.length-1];
			System.arraycopy(one,1,B,0,one.length-1);
			A_Xor_B= new byte[two.length-1];
			System.arraycopy(two,1,A_Xor_B,0,two.length-1);
			A = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     A[i]=(byte)(B[i]^A_Xor_B[i]);
			    }
			
		}
		else if (one[0]==3 && two [0]==0){
			A_Xor_B= new byte[one.length-1];
			System.arraycopy(one,1,A_Xor_B,0,one.length-1);
			A= new byte[two.length-1];
			System.arraycopy(two,1,A,0,two.length-1);
			B = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     B[i]=(byte)(A[i]^A_Xor_B[i]);
			    }
		}
		else if (one [0]==3 && two [0]== 1){
			A_Xor_B= new byte[one.length-1];
			System.arraycopy(one,1,A_Xor_B,0,one.length-1);
			B= new byte[two.length-1];
			System.arraycopy(two,1,B,0,two.length-1);
			A = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     A[i]=(byte)(B[i]^A_Xor_B[i]);
			    }	
		}
		else if (one [0]==0 && two[0]==1){
			A= new byte[one.length-1];
			System.arraycopy(one,1,A,0,two.length-1);
			B= new byte[two.length-1];
			System.arraycopy(two,1,B,0,two.length-1);
		}
		else{
			A= new byte[two.length-1];
			System.arraycopy(two,1,A,0,two.length-1);
			B= new byte[one.length-1];
			System.arraycopy(one,1,B,0,one.length-1);
		}
	}
	public static void  Four_Six(byte [] one, byte [] two, byte [] three, byte [] four, byte [] five, byte [] six){
		if(one==null && two == null){
			C= new byte[one.length-1];
			System.arraycopy(three,1,C,0,one.length-1);
			A = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     A[i]=(byte)(C[i]^five[i+1]);
			    }
			 B = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     B[i]=(byte)(C[i]^six[i+1]);
			    }
			 
		}
		else if((one==null && three == null)){
			B= new byte[one.length-1];
			System.arraycopy(two,1,B,0,one.length-1);
			A = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     A[i]=(byte)(B[i]^four[i+1]);
			    }
			 C = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     C[i]=(byte)(B[i]^six[i+1]);
			    }
		}
		else if((two==null && three == null)){
			A= new byte[one.length-1];
			System.arraycopy(one,1,A,0,one.length-1);
			B = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     B[i]=(byte)(A[i]^four[i+1]);
			    }
			 C = new byte [one.length-1];			
			 for (int i =0;i<A.length;i++)
			    {
			     C[i]=(byte)(A[i]^five[i+1]);
			    }
		}
	}
}

	
		  
